package com.ian.service.impl;

import com.ian.dao.PerArticleMapper;
import com.ian.pojo.PerArticle;
import com.ian.service.PerArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 新闻列表服务
 *
 * @Author IanZy
 * @Date \
 */
@Service
public class PerArticleServiceImpl implements PerArticleService {
    @Autowired
    PerArticleMapper perArticleMapper;

    @Override
    public List<PerArticle> findAllArticles() {
        return perArticleMapper.findAllArticles();
    }

    @Override
    public PerArticle selectByPrimaryKey(Integer perArticleId) {
        return perArticleMapper.selectByPrimaryKey(perArticleId);
    }

    @Transactional
    @Override
    public int updateByPrimaryKey(PerArticle record) {
        return perArticleMapper.updateByPrimaryKey(record);
    }
}
